<?php

require_once 'Pipes/Decorator.php';

class Pipes_Xml_Xpath extends Pipes_Decorator
{
	public function __construct(Pipes_Xml_Document $document) {
		$this->_decorated = new DOMXPath($document->domDocument());
	}
	
	public function query($query) {
		$result = $this->_decorated->query($query);
		$return = new Pipes_Xml_NodeList($result);
		/* var_dump($result->length);
		var_dump($return->length); */
		return $return;
	}
}